﻿Public Class WfBuscaOsTodoMundo
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        lbmsg.Text = ""
        GvOs.DataBind()
        Try
            Dim objOsDao As New OsDAO
            Dim dados As New DataTable
            dados = objOsDao.OsJoinCpfLivre(tbcpf.Text)
         
            If dados.Rows.Count = 0 Then
                lbmsg.Text = " Nenhuma O.S Encontrada !"
            Else
                GvOs.AutoGenerateColumns = False
                GvOs.DataSource = dados
                GvOs.DataBind()
                tbcpf.Text = ""
            End If
        Catch ex As Exception

        End Try
    End Sub
End Class